<%@ page language="java" import="java.util.*,com.google.gson.*" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html class="responsive-540" lang="zh-CN" >
<head>
    <meta charset="utf-8">
    <meta name="keywords" content="有赞,移动电商服务平台" />
    <meta name="HandheldFriendly" content="True">
    <meta name="MobileOptimized" content="320">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="cleartype" content="on">
    <link rel="dns-prefetch" href="//b.yzcdn.cn/" />
    <link rel="dns-prefetch" href="//img.yzcdn.cn/" />
    <link rel="shortcut icon" href="//dn-kdt-static.qbox.me/v2/image/yz_fc.ico" />
     <title> ${pagetitle}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <!-- CSS -->
    <link rel="stylesheet" href="${webRoot}/static/v2/build_css/stylesheets/wap/base.css" >    
	<link rel="stylesheet" href="${webRoot}/static/v2/build_css/stylesheets/wap/projects/showcase.css" >  
	<style>
            .content {
                background-color: #f9f9f9;
            }
        </style>
<script>
	var _global =${base};
	_global.url=${url};
	_global.mp_data=${mp_data};
	_global.query_path="/show/homepage";
	_global.module="show";
	_global.controller="show_controller";
	_global.action="homepage_action";
</script>

    </head>
<body class=" ">
<div class="container ">
	<div class="content ">
		<div class="content-body">
			<!-- 店铺主页模板 - 微小店 -->
<% 
	JsonArray dataJson = (JsonArray)request.getAttribute("components");
	JsonObject jsonData1 = (JsonObject)dataJson.get(0);
	JsonObject jsonData2 = (JsonObject)dataJson.get(1);
	JsonObject jsonData3 = (JsonObject)dataJson.get(2);
%>
			<div class="tpl-wxd">
			<div class="tpl-wxd-header"
				style="background-color:<% if(null != jsonData2.get("backgroundColor")){out.write(jsonData2.get("backgroundColor").getAsString());}%>; background-image: url(<% out.write(jsonData2.get("backgroundImage").getAsString());%>);">
				<div class="tpl-wxd-title">${shop_name}</div>
				<div class="tpl-wxd-avatar">
					<img src="<% out.write(jsonData2.get("avatar").getAsString());%>" alt="头像">
				</div>
			</div>
			</div>		
			<!-- 分类 -->
			<div class="custom-category">
				<ul class="clearfix">
					<% 
					JsonArray sub_entry = (JsonArray)jsonData3.get("sub_entry");
						for(JsonElement je : sub_entry){
						JsonObject item = (JsonObject)je;%>
					<li>
					<a href="<% out.write(item.get("link_url").getAsString());%>"><% out.write(item.get("title").getAsString());%></a>
					</li>
					<% }%>
				</ul>
			</div>
			
			<jsp:include  page="../../global_block.jsp"/>
		 </div> 
		 <jsp:include  page="../../global_sidebar.jsp"/>
		 <jsp:include  page="../../global_shopnav.jsp"/>
	</div>
	<div class="js-footer" style="min-height: 1px;">
	<jsp:include  page="../../global_copyright.jsp"/>
	</div>       

</div>
<!-- JS -->
<script src="${webRoot}/static/v2/vendor/jquery-2.0.3.min.js" ></script>
<script src="${webRoot}/static/v2/build/wap/base.js" ></script>
<script src="${webRoot}/static/v2/build/wap/swiper/main.js" ></script>                
<script src="${webRoot}/static/v2/build/wap/showcase/base.js" ></script>
<script src="${webRoot}/static/v2/build/wap/showcase/modules/scroll.js" ></script>
<div id="right-icon" class="icon-hide  no-border hide" data-count = "1">
<div class="right-icon-container clearfix" style="width: 50px">

<a id="global-cart" href="http://wap.koudaitong.com/v2/trade/cart?kdt_id=355963" class="no-text" style="background-image: url(http://static.koudaitong.com/v2/image/setting/shopping-cart/2x/s0.png);background-size: 50px 50px;background-position: center;">
<p class="right-icon-img"></p>
<p class="right-icon-txt">购物车</p>
</a>
</div>
</div>



<script src="${webRoot}/static/v2/build/wap/showcase/global_icon.js" ></script>

</body>
</html>